import request from '@/utils/request'
import type { LoginParams, LoginResponseData, UserInfoResponseData } from './type'

const UserApi = {
	user_login: '/user/login',
	user_info: '/user/info',
} as const

// 登录
export const reqLogin = (params: LoginParams) => {
	return request.post<any, LoginResponseData>(UserApi.user_login, params)
}

// 用户信息
export const reqUserInfo = () => {
	return request.get<any, UserInfoResponseData>(UserApi.user_info)
}
